package com.wyx.bbs.mapper;

import com.wyx.bbs.domain.Article;
import com.wyx.bbs.domain.ArticleToUser;
import com.wyx.bbs.domain.PostToUser;
import com.wyx.bbs.domain.ThumbsUp;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @Author: Wu YunXia
 * @Description: 文章
 * @Date: Created in 11:21 2021/3/31
 * @Modefied By:
 */
@Mapper
public interface ArticleMapper {

/**
 * 添加
 * @param post
 * @return
 */
@Mapper
int addPost (Article post);

/**
 * 查询全部
 * @return
 */
@Mapper
List<ArticleToUser> getArticleAll(Integer uid);


/**
 * 查询全部 一登陆
 * @return
 */
@Mapper
List<PostToUser> getAll (Integer uid);


/**
 * 按postId查询
 * @param postId
 * @return
 */
@Mapper
List<ArticleToUser> getByPostId(Integer postId, Integer uid);



/**
 * 按uid查询
 * @param uid
 * @return
 */
@Mapper
List<ArticleToUser> getByUid(Integer uid, Integer selfId);


/**
 * 按id删除
 * @param id
 * @return
 */
@Mapper
int delArticle(Integer id);

}
